@echo off

echo -------------------------------------------------------------------------
echo Sofa Build/Config/Deploy Script for Win32
echo -------------------------------------------------------------------------

setlocal
set CURRENT_DIR=%~dp0%

if "%1" == "build" goto BUILD

goto CONFIG

:BUILD
call mvn clean install -Dmaven.test.skip=true 

:CONFIG
cd assembly\ear\target\supergw.ear\config
antxconfig -I -d autoconf\auto-config.xml
cd %CURRENT_DIR%

:DEPLOY
java -classpath .\deploy\miniant\lib\ant-launcher.jar -Dant.home=.\deploy\miniant org.apache.tools.ant.launch.Launcher -buildfile all.xml %1 %2 %3 %4 %5 %6 %7 %8 %9

:END

